package drg_group.changsha_2023.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.changsha_2023.Base;
import drg_group.changsha_2023.MedicalRecord;
import drg_group.changsha_2023.DRG.MDCD_DRG;

public class DR1 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={"C00.000","C00.001","C00.002","C00.100","C00.101","C00.102","C00.200","C00.200x002","C00.300","C00.301","C00.302","C00.303","C00.304","C00.400","C00.401","C00.402","C00.403","C00.404","C00.500","C00.500x002","C00.500x003","C00.500x004","C00.500x005","C00.600","C00.800","C00.900","C01.x00","C01.x00x003","C01.x01","C02.000","C02.000x002","C02.100","C02.100x001","C02.101","C02.200","C02.200x002","C02.201","C02.300","C02.300x002","C02.300x003","C02.400","C02.800","C02.900","C02.900x002","C03.000","C03.000x002","C03.001","C03.100","C03.100x002","C03.101","C03.900","C03.900x001","C03.901","C04.000","C04.100","C04.800","C04.900","C05.000","C05.100","C05.200","C05.800","C05.900","C05.900","C05.900x002","C06.000","C06.001","C06.100","C06.100x002","C06.100x003","C06.100x004","C06.100x005","C06.101","C06.102","C06.200","C06.800","C06.900","C06.901","C06.902","C07.x00","C07.x00x003","C08.000","C08.100","C08.800","C08.800x001","C08.900","C08.900x001","C09.000","C09.100x001","C09.100x002","C09.100x003","C09.800","C09.900","C09.901","C09.902","C10.000","C10.100","C10.101","C10.102","C10.200","C10.300","C10.400","C10.800","C10.800x002","C10.900","C11.000","C11.001","C11.100","C11.101","C11.102","C11.200","C11.200x002","C11.201","C11.202","C11.300","C11.300x001","C11.300x004","C11.300x005","C11.300x006","C11.301","C11.302","C11.800","C11.801","C11.900","C11.901","C12.x00x002","C13.000","C13.100x001","C13.100x002","C13.101","C13.200","C13.800","C13.900","C13.901","C14.000","C14.001","C14.002","C14.003","C14.200","C14.800","C14.800x001","C14.800x002","C14.800x003","C14.800x004","C14.800x005","C14.800x006","C14.800x007","C30.000","C30.001","C30.002","C30.003","C30.004","C30.005","C30.100","C30.101","C30.102","C30.103","C31.000","C31.100","C31.200","C31.300","C31.800","C31.801","C31.900x001","C32.000","C32.001","C32.100","C32.100x004","C32.101","C32.102","C32.103","C32.104","C32.200","C32.300","C32.800","C32.900","C39.000","C39.801","C41.000x018","C41.000x019","C41.000x020","C41.000x021","C41.000x023","C41.000x025","C41.000x027","C41.001","C41.002","C41.003","C41.004","C41.005","C41.006","C41.007","C41.008","C41.009","C41.010","C41.011","C41.012","C41.100","C43.000","C43.200x001","C43.200x003","C43.201","C43.300","C43.302","C43.400x002","C43.401","C44.000","C44.200x001","C44.201","C44.300","C44.300x005","C44.300x006","C44.302","C44.304","C44.305","C44.306","C44.307","C44.400x004","C44.401","C46.200","C47.000x004","C47.000x005","C47.000x006","C47.000x007","C47.000x008","C47.000x009","C47.000x010","C47.000x011","C49.000x004","C49.000x005","C49.001","C49.002","C49.004","C49.005","C71.900x009","C71.900x010","C76.000x002","C76.000x007","C76.001","C76.002","C76.003","C76.004","C76.005","C76.006","C77.000x005","C77.001","C77.002","C77.003","C77.004","C77.005","C77.006","C77.007","C77.008","C78.300x004","C78.300x005","C78.300x006","C78.300x008","C78.300x010","C78.301","C78.302","C78.303","C78.305","C79.200x008","C79.202","C79.203","C79.500x004","C79.500x007","C79.500x028","C79.502","C79.503","C79.504","C79.505","C79.800x806","C79.800x812","C79.800x824","C79.800x825","C79.800x826","C79.800x828","C79.800x833","C79.800x840","C79.800x843","C79.800x844","C79.800x845","C79.801","C79.802","C79.803","C79.804","C79.830","C79.831","C79.832","C79.834","C79.835","D00.000x005","D00.000x007","D00.000x008","D00.001","D00.002","D00.003","D00.004","D00.005","D00.006","D00.007","D00.008","D00.009","D00.010","D00.011","D00.012","D00.013","D02.000","D02.000x003","D02.000x004","D02.001","D02.002","D02.301","D02.302","D02.303","D03.000","D03.200x002","D03.201","D03.301","D03.400x002","D03.401","D04.000","D04.200x001","D04.201","D04.300x001","D04.300x002","D04.400x001","D04.401","D09.701","D37.000x001","D37.000x002","D37.000x003","D37.000x004","D37.000x005","D37.000x006","D37.000x007","D37.000x008","D37.000x009","D37.000x010","D37.000x011","D37.000x012","D37.000x013","D37.000x014","D37.000x015","D37.003","D37.005","D37.007","D37.009","D37.011","D37.013","D37.015","D37.017","D37.019","D38.000x001","D38.000x002","D38.001","D38.003","D38.500x001","D38.500x003","D38.500x004","D38.500x005","D38.502","D38.504","D38.506","D38.508","D38.509","D48.200x002","D48.200x003","D48.200x004","D48.200x005","D48.200x006","D48.200x007","D48.200x008","D48.200x009","D48.700x007","D48.700x025","D48.702","Q30.800x008"};
        String[] adrg_zd1={};
        String[] adrg_ss={};
        String[] adrg_ss1={};
        
        if (true && Base.contains(adrg_zd,record.zdList[0])){
            Base.groupMessages.putMessage(record.Index,"符合DR1入组条件，匹配规则：主诊断匹配");
                
            if (MDCD_DRG.DR19_group(record)){
                return "DR19";
            }

            return "DR1";
        }else{
            return "";
        }
    }
}

